#pragma once

#include <iostream>
#include <vector>

using namespace std;

namespace gp
{
	template <size_t N>
	class bitset
	{
	public:
		bitset()
		{
			/*enum{ max = 1000};*/
			_a.resize(N / 32 + 1);
		}

		void set(size_t x)
		{
			size_t group = x / 32;
			size_t num = x % 32;
			_a[group] |= (1 << num);
		}

		void reset(size_t x)
		{
			size_t group = x / 32;
			size_t num = x % 32;
			_a[group] &= ~(1 << num);
		}

		bool test(size_t x)
		{
			size_t group = x / 32;
			size_t num = x % 32;
			return _a[group] & (1 << num);
		}

	private:
		vector<int> _a;
	};
}
